<?php
/**
 * this Dig_Application_Resource_Cache application resource configures the cache
 * and registers it with Digitalus Core
 *
 */
class Dig_Resource_Cache extends Zend_Application_Resource_ResourceAbstract
{
    public function init ()
    {
        $options = $this->getOptions();
        $cache = Zend_Cache::factory($options['frontEnd'], $options['backEnd'], $options['frontEndOptions'], $options['backEndOptions']);
        Dig_Service_Core::getInstance()->setCache($cache);
        return $cache;
    }
}